package p.ithorns.framework.minio.model;

import org.springframework.web.multipart.MultipartFile;

/**
 * FileUploadRequest
 *
 * @author liuhaitao
 * @date 2024/4/8 14:19
 * @since 1.0.0
 */
public class UploadReq {

    /**
     * 文件
     */
    MultipartFile file;

    /**
     * 文件名称
     */
    private String name;

    /**
     * 是否切片
     */
    boolean isSliced;

    /**
     * 切片数
     */
    int slices ;

    /**
     * 切片编号
     */
    int index;

    @Override
    public String toString() {
        return "{" +
                "name:" + name +
                ", isSliced:" + isSliced +
                ", slices:" + slices +
                ", index:" + index +
                "}";
    }

    public MultipartFile getFile() {
        return file;
    }

    public String getName() {
        return name;
    }

    public boolean isSliced() {
        return isSliced;
    }

    public int getSlices() {
        return slices;
    }

    public int getIndex() {
        return index;
    }
}